package com.spdd.mt.biz.constant;


import com.spdd.mt.common.base.BaseEnum;

public enum NotifyStatus implements BaseEnum<Integer> {

    INIT(0, "待通知"),
    SUCCESS(1, "通知成功"),
    FAILED(2, "通知失败"),
    ;

    private final Integer code;

    private final String msg;

    NotifyStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getValue() {
        return code;
    }

    @Override
    public String getDesc() {
        return msg;
    }


    public static NotifyStatus findByCode(Integer value) {
        for (NotifyStatus notifyStatus : NotifyStatus.values()) {
            if (notifyStatus.getValue().equals(value)) {
                return notifyStatus;
            }
        }
        return null;
    }
}
